/*
 * Map.h
 *
 *  Created on: Jun 20, 2012
 *      Author: The Almighty Eric
 */

#ifndef MAP_H
#define MAP_H
#include <list>
#include "SDL.h"
#include <string>
#include "engine.h"
#include "MapObject.h"

class Map
{
public:
	std::string name;
	std::string audio;
	bool grid;
	bool lockgrid;
	int gridx, gridy;
	std::list<MapObject> objects;
	list<MapObjects>::iterator it;

	Map();
	void setname(std::string name);
	void setaudio(std::string audio);
	void setgrid(int x, int y);
	void showgrid(bool g);
	void locktogrid(bool l);
	void placeobject(MapObject o);
	void eraseobject(list<MapObjects>::iterator it);
	list<MapObjects>::iterator collision(int mousex, int mousey, engine e);
};

#endif /* MAP_H */
